home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 7: Sunsite
/
Linux Cubed Series 7 - Sunsite Vol 1.iso
/
system
/
linux-bo
/
etherboo.000
/
etherboo
/
etherboot-2.0
/
netboot-freebsd
/
Makefile.32
< prev
next >
Wrap
Makefile
|
1996-06-22
|
4KB
|
129 lines
# Makefile,v 1.4 1994/12/31 17:16:49 jkh Exp
#
# Makefile for NETBOOT
#
# Basic Options:
# -DVERSION - Set the version string
# -DASK_BOOT - Ask "Boot from Network (Y/N) ?" at startup
# -DROMSIZE - Size of EPROM - Must be set (even for .COM files)
# -DRELOC - Relocation address (usually 0x90000)
# ^^^^^^^
# has to be changed to 0x9A000 for loading Linux kernel
# -DPRIORIZEBOOTPKERNEL
# - first honor the kernel name of the BOOTP reply
# before trying defaults
# -DBOOTPKERNELONLY
# - never use TFTP for loading default files; the
# BOOTP reply has to set a valid kernel name
# -DINT19H - Boot ROM hooks into INT19H for delayed boot
# Alternative is to take control as soon as BIOS
# detects the ROM
#
# NS8390 Options:
# -DINCLUDE_WD - Include Western Digital/SMC support
# -DINCLUDE_NE - Include NE1000/NE2000 support
# -DINCLUDE_3COM - Include 3c503 support
# -D_3COM_USE_AUI - Disable transceiver on 3c503 by default
# -DNE_BASE - Base I/O address for NE1000/NE2000
# -DNE_NOSCAN - Do not try to automatically find NEx000 I/O address
# -D_3COM_BASE - Base I/O address for 3c503
# -DWD_DEFAULT_MEM- Default memory location for WD/SMC cards
# XXX nothing depends on this Makefile so you must run `make clean' after
# changing an option.
#
PROG= wd.com 3c503.com ne.com 3c509.com wd.rom 3c503.rom ne.rom 3c509.rom
# Order is very important on the SRCS line for this prog
SRCS= start2.S main.c linuxloader.c misc.c bootmenu.c rpc.c
OBJS= start2.o main.o linuxloader.o misc.o bootmenu.o rpc.o
ROBJS= start2.ro main.o linuxloader.o misc.o bootmenu.o rpc.o
TOBJS= start2.ro test.o misc.o
CFLAGS= -DVERSION=\"2.0\" -DNFS -DROMSIZE=${ROMSIZE} -DRELOC=${RELOCADDR}
CFLAGS+= -O2 -fstrength-reduce -fomit-frame-pointer -m386
CFLAGS+= -Wall -Wno-format -Wno-unused
CFLAGS+= -DPRIORIZEBOOTPKERNEL -DINT19H
WDFLAGS= -DINCLUDE_WD -DWD_DEFAULT_MEM=0xD0000
T503FLAGS= -DINCLUDE_3COM -D_3COM_BASE=0x300
T509FLAGS=
NEFLAGS= -DINCLUDE_NE -DNE_BASE=0x300
CLEANFILES= ${OBJS}
CLEANFILES+= makerom start2.ro wd.o 3c503.o ne.o 3c509.o test.o *.com *.rom *.tmp *.tst
LDFLAGS+= -N -Ttext ${RELOCADDR} -e _start -nostdlib
ROMSIZE=16384
RELOCADDR=0x9A000
.SUFFIXES: .ro .tst .rom .com
all: ${PROG}
clean:
${RM} -rf ${CLEANFILES}
.S.ro:
${CC} ${CFLAGS} -DBOOTROM -o $@ -c $<
.S.o:
${CC} ${CFLAGS} -o $@ -c $<
.o.tst:
${LD} ${LDFLAGS} -o $*.tmp ${TOBJS} $*.o
size $*.tmp
objdump -k -q -o ${RELOCADDR} $*.tmp > $@
makerom $@
.o.rom:
${LD} ${LDFLAGS} -o $*.tmp ${ROBJS} $*.o
size $*.tmp
objdump -k -q -o ${RELOCADDR} $*.tmp > $@
makerom $@
.o.com:
${LD} ${LDFLAGS} -o $*.tmp ${OBJS} $*.o
size $*.tmp
objdump -k -q -o ${RELOCADDR} $*.tmp > $@
$(OBJS): linuxdef.h netboot.h
wd.o: ns8390.c linuxdef.h netboot.h
${CC} $(CFLAGS) $(WDFLAGS) -o $@ -c $<
3c503.o: ns8390.c linuxdef.h netboot.h
${CC} $(CFLAGS) $(T503FLAGS) -o $@ -c $<
3c509.o: 3c509.c linuxdef.h netboot.h
${CC} $(CFLAGS) $(T509FLAGS) -o $@ -c $<
ne.o: ns8390.c linuxdef.h netboot.h
${CC} $(CFLAGS) $(NEFLAGS) -o $@ -c $<
makerom: makerom.c
${CC} -o $@ -DROMSIZE=${ROMSIZE} makerom.c
# targets for making test ROMs
wd.tst: makerom start2.ro ${TOBJS} wd.o
3c503.tst: makerom start2.ro ${TOBJS} 3c503.o
ne.tst: makerom start2.ro ${TOBJS} ne.o
3c509.tst: makerom start2.ro ${TOBJS} 3c509.o
wd.rom: makerom start2.ro ${ROBJS} wd.o
3c503.rom: makerom start2.ro ${ROBJS} 3c503.o
ne.rom: makerom start2.ro ${ROBJS} ne.o
3c509.rom: makerom start2.ro ${ROBJS} 3c509.o
wd.com: start2.o ${OBJS} wd.o
3c503.com: start2.o ${OBJS} 3c503.o
ne.com: start2.o ${OBJS} ne.o
3c509.com: start2.o ${OBJS} 3c509.o